import requests, os

files = {
    "deploy_gender.prototxt": "https://raw.githubusercontent.com/spmallick/learnopencv/master/AgeGender/deploy_gender.prototxt",
    "gender_net.caffemodel": "https://raw.githubusercontent.com/spmallick/learnopencv/master/AgeGender/gender_net.caffemodel",
    "deploy_age.prototxt": "https://raw.githubusercontent.com/spmallick/learnopencv/master/AgeGender/deploy_age.prototxt",
    "age_net.caffemodel": "https://raw.githubusercontent.com/spmallick/learnopencv/master/AgeGender/age_net.caffemodel"
}

for name, url in files.items():
    print("正在下载", name)
    with open(name, 'wb') as f:
        f.write(requests.get(url).content)
print("全部下载完成！")
